define([],function(){
	function yuDing(){
		Ajax();
	}
	//获取数据
	function Ajax(){
		$.ajax({
			type : 'GET',
			url : 'http://h5.yztctech.net/api/axf/apiyuding.php',
			success : function(data){
//				console.log(data)
				var obj = JSON.parse(data).product;
				var html = '';
				for(var i in obj){
					html+='<li class="li_menu"><div class="li_menu_img"><img src="'+obj[i].img+'"/>'+
					'</div><div class="li_menu_jieshao"><p class="name">'+obj[i].name+'</p>'+
					'<p class="specifics">'+obj[i].specifics+'</p><p class="price">'+
					'<span class="new_price">￥<i>'+obj[i].price+'</i></span>'+
					'<span class="before_price">￥<i>'+obj[i].market_price+'</i></span></p>'+
					'<div class="car"></div></div></li>';
				}
				$('.ul_menu').html(html);
				border();
			}
		})
	}
	function border(){
		$('#flex li').on('click',function(){
			$('#flex li').removeClass('border');
			$(this).addClass('border');
		})
	}
	return {
		yuDing : yuDing
	}
})